package com.bdqn.springbootmybatisplus.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

/**
 * sys_user
 *
 * @author
 * @since
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("sys_user")
public class SysUser implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 编号
	 */
	@TableId(type = IdType.AUTO)
	private Long usrId;

	/**
	 * 姓名
	 */
	private String usrName;

	/**
	 * 密码
	 */
	private String usrPassword;

	/**
	 * 角色编号
	 */
	private Long usrRoleId;

	/**
	 * 状态
	 */
	private Long usrFlag;

	/**
	 * 角色表的姓名字段
	 */
	private String roleName;

	/**
	 * 角色表
	 */
	private SysRole sysRole;

	public SysRole getSysRole() {
		return sysRole;
	}

	public void setSysRole(SysRole sysRole) {
		this.sysRole = sysRole;
	}

	public SysUser(String usrName, String usrPassword) {
		this.usrName = usrName;
		this.usrPassword = usrPassword;
	}

	public SysUser(String usrName, Long usrRoleId) {
		this.usrName = usrName;
		this.usrRoleId = usrRoleId;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public Long getUsrId() {
		return usrId;
	}

	public void setUsrId(Long usrId) {
		this.usrId = usrId;
	}

	public String getUsrName() {
		return usrName;
	}

	public void setUsrName(String usrName) {
		this.usrName = usrName;
	}

	public String getUsrPassword() {
		return usrPassword;
	}

	public void setUsrPassword(String usrPassword) {
		this.usrPassword = usrPassword;
	}

	public Long getUsrRoleId() {
		return usrRoleId;
	}

	public void setUsrRoleId(Long usrRoleId) {
		this.usrRoleId = usrRoleId;
	}

	public Long getUsrFlag() {
		return usrFlag;
	}

	public void setUsrFlag(Long usrFlag) {
		this.usrFlag = usrFlag;
	}

	public SysUser(String usrName) {
		this.usrName = usrName;
	}

	public SysUser(String usrName, String usrPassword, Long usrRoleId, Long usrFlag) {
		this.usrName = usrName;
		this.usrPassword = usrPassword;
		this.usrRoleId = usrRoleId;
		this.usrFlag = usrFlag;
	}
}
